

import 'package:flutterlib/common/config/config.dart';
import 'package:flutterlib/model/oss_token.dart';
import 'package:flutterlib/model/user/batch_get_users.dart';
import 'package:flutterlib/model/user/user_entity.dart';
import 'package:retrofit/retrofit.dart';
import 'package:dio/dio.dart' hide Headers;

import '../api.dart';

part 'user_api.g.dart';

@RestApi()
abstract class UserApi {
  factory UserApi(Dio dio, {String baseUrl}) = _UserApi;

  factory UserApi.builder()=> UserApi(HttpManager().getDio());

  @GET("/accountopen/getUserInfo")
  Future<UserEntity> getUserInfo(@Query("uid") int uid);

  @POST("/accountopen/batchGetUserInfo")
  Future<List<UserEntity>> batchGetUserInfo(@Body() BatchGetUsers batchGetUsers);

  @GET("/account/osstoken")
  Future<OssToken> ossToken();

  @GET("/account/reportLocation")
  Future<bool> reportLocation(@Query("location") String location);

}


